package com.uusee.crawler.util;

public final class DomainUtils {
	
	public static String getDomain(String url) {
		String domain = "";
		String reg=".*?(([\\w-]+)\\.(com|net|org|gov|cc|biz|info|tv|me|hk|tw|cd|tel|asia|name|mobi))";
		String reg1=".*?(([\\w-]+)\\.(com|net|org|gov|cc|biz|info|tv|me|hk|tw|cd|tel|asia|name|mobi)\\.(cn|hk|tw))";
		if (PageProcessorUtils.isMatch(reg1, url)) {
			reg = reg1;
		}
		domain = PageProcessorUtils.getValue(reg, url,1);
		return domain;
	}
	
}
